package pojo;

import java.util.Objects;

public class TbAccount {
    private Integer accountId;
    private Double accountTotal;
    private Double accountFreeze;
    private Double accountBalance;
    private Integer userIdAccount;
    private TbUser tbUserByUserIdAccount;

    public Integer getAccountId() {
        return accountId;
    }

    public void setAccountId(Integer accountId) {
        this.accountId = accountId;
    }

    public Double getAccountTotal() {
        return accountTotal;
    }

    public void setAccountTotal(Double accountTotal) {
        this.accountTotal = accountTotal;
    }

    public Double getAccountFreeze() {
        return accountFreeze;
    }

    public void setAccountFreeze(Double accountFreeze) {
        this.accountFreeze = accountFreeze;
    }

    public Double getAccountBalance() {
        return accountBalance;
    }

    public void setAccountBalance(Double accountBalance) {
        this.accountBalance = accountBalance;
    }

    public Integer getUserIdAccount() {
        return userIdAccount;
    }

    public void setUserIdAccount(Integer userIdAccount) {
        this.userIdAccount = userIdAccount;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        TbAccount tbAccount = (TbAccount) o;
        return Objects.equals(accountId, tbAccount.accountId) &&
                Objects.equals(accountTotal, tbAccount.accountTotal) &&
                Objects.equals(accountFreeze, tbAccount.accountFreeze) &&
                Objects.equals(accountBalance, tbAccount.accountBalance) &&
                Objects.equals(userIdAccount, tbAccount.userIdAccount);
    }

    @Override
    public int hashCode() {
        return Objects.hash(accountId, accountTotal, accountFreeze, accountBalance, userIdAccount);
    }

    public TbUser getTbUserByUserIdAccount() {
        return tbUserByUserIdAccount;
    }

    public void setTbUserByUserIdAccount(TbUser tbUserByUserIdAccount) {
        this.tbUserByUserIdAccount = tbUserByUserIdAccount;
    }
}
